import logging
from PyCmpltrtok.auth.mongo.conn import conn

DEFAULT_FORMAT = "%(levelname)s:%(name)s:%(message)s"
# LOG_FORMAT = "%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s"
LOG_FORMAT = "%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(name)s: %(message)s"

# logging.setLevel(logging.DEBUG)  # AttributeError: module 'logging' has no attribute 'setLevel'

logging.basicConfig(format=LOG_FORMAT, level=logging.DEBUG)

if __name__ == '__main__':

    logging.info('This is a info log.')
    logging.debug('Debug info here.')
